from django.db import models

# Create your models here.
class Hexagram(models.Model):
    hexagram = models.CharField(max_length=200)
    spellname = models.CharField(max_length=200)
    num = models.CharField(max_length=200)
    records = models.CharField(max_length=200)

    def __str__(self):
        return self.hexagram

class Yao(models.Model):
    hexagram = models.ForeignKey('Hexagram',on_delete=models.CASCADE)
    yao = models.CharField(max_length=200)
    records = models.CharField(max_length=200)

    def __str__(self):
        return self.yao